Skip to content

ci: pin actions/checkout to commit SHA - #5

Open
AmirhosseinOlyaei wants to merge 3 commits into
mainfrom
ci/pin-checkout-sha
Open

AmirhosseinOlyaei wants to merge 3 commits into
mainfrom
ci/pin-checkout-sha

Conversation

@AmirhosseinOlyaei

Copy link
Copy Markdown
Member

Summary

  • Pins actions/checkout@v6 to commit SHA 8ade135a41bc03ea155e62e844d188df1ea18608 in the Semgrep workflow.
  • Fixes the one blocking finding from the one-time full-repo Semgrep scan (github-actions-mutable-action-tag): mutable tags can be silently repointed, enabling supply-chain attacks.

Test plan

  • Full-repo semgrep scan --config auto run locally via container: 1 finding, this line
  • semgrep/ci check passes on this PR

Generated with Devin

Semgrep full-repo scan flagged the mutable @v6 tag as a blocking
supply-chain finding (github-actions-mutable-action-tag).

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes: pinning is the right fix for github-actions-mutable-action-tag, but the pinned SHA is not v6.

  • 8ade135a41bc03ea155e62e844d188df1ea18608 is actions/checkout v4.1.0 (Sept 2023). Verified with git ls-remote --tags https://github.com/actions/checkout.
  • Current v6 (same commit as v6.1.0) is d23441a48e516b6c34aea4fa41551a30e30af803.
  • Merging as is silently downgrades checkout from v6 to v4.1.0, and the # v6 comment misleads anyone auditing pins. v4.1.0 also runs on the Node 20 action runtime, which GitHub is phasing out.
  • semgrep/ci passes either way: the rule only checks for a SHA, not that it matches the tag, so CI cannot catch this.

No security impact (immutable commit in the official repo; workflow is contents: read, PR-only). Everything else in the diff vs main is fine. Approve once the SHA is corrected.

Written by Devin

Comment thread .github/workflows/semgrep.yml Outdated
image: semgrep/semgrep
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v6

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This SHA is actions/checkout v4.1.0, not v6. Pin the current v6 instead:

Suggested change
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v6
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0

AmirhosseinOlyaei and others added 2 commits November 15, 2026 16:46
Adds .npmrc policy file and aligns packageManager pin with
fleet-pinned pnpm 12.18.0. Lockfile regenerated under the new pin.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 2 potential issues.

1 flag not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)

Devin Review

Comment thread .npmrc
@@ -0,0 +1,4 @@
# DevArts Lab pnpm fleet policy - copy to <repo>/.npmrc
engine-strict=true

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Install accepts incompatible Node versions

On Node 24.10, pnpm install accepts Ultracite despite its Node 24.15 minimum for the Node 24 line. The pinned pnpm ignores engine-strict in .npmrc, so installation warns instead of rejecting the incompatible tool.

Learn more

The setup instructions tell contributors to use Node 24 and run pnpm install. The dependency declaration pins pnpm 12.18.0 and includes Ultracite. That pnpm version reads engine policy from workspace configuration, not .npmrc; its effective configuration does not contain engineStrict. The locked Ultracite release requires Node 24.15 or later on the Node 24 line.

Example: A contributor on Node 24.10 follows setup. Their Node version passes the project's 24.x range, and installation warns about Ultracite rather than stopping on the incompatible dependency.

Recommended fix: Set engineStrict: true in workspace configuration and remove the ignored .npmrc entry. Align the documented Node prerequisite and engines.node with the tooling's supported Node 24 range.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

Comment thread .npmrc
# DevArts Lab pnpm fleet policy - copy to <repo>/.npmrc
engine-strict=true
manage-package-manager-versions=true
minimum-release-age=1440

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟨 Dependency cooling-off period too short

The pinned pnpm ignores minimum-release-age in .npmrc and falls back to one day. The threat model requires seven days, so newly resolved releases can enter the lockfile six days early.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant